<script setup lang="ts">
import SettingsSection from "@/components/settings/settings-section.vue";
import { reactive } from "vue";

const formState = reactive({
  enable: false,
  type: "http",
  address: "127.0.0.1",
  port: 10808,
});

const setDefaultValue = () => {};

const save = () => {};
</script>

<template>
  <settings-section :model="formState" :set-default-value="setDefaultValue" :save-value="save">
    <a-form-item name="enable" label=" " :colon="false">
      <a-checkbox v-model:checked="formState.enable">启用</a-checkbox>
    </a-form-item>
    <a-form-item name="type" label="类型">
      <a-radio-group v-model:value="formState.type">
        <a-radio value="http">HTTP</a-radio>
        <a-radio value="socks" disabled>SOCKS</a-radio>
      </a-radio-group>
    </a-form-item>
    <a-form-item name="address" label="地址">
      <a-input v-model:value="formState.address" class="w-300" allow-clear />
    </a-form-item>
    <a-form-item name="port" label="端口">
      <a-input-number v-model:value="formState.port" class="w-130" :min="1" :max="65535" />
    </a-form-item>
  </settings-section>
</template>

<style scoped lang="less"></style>
